import {Portal, Toast} from '@ant-design/react-native';
import {TextConstant} from '../common/Constant';
export default class ToastUtil {
  static info(msg, onClose = null, duration = 1.5, mask = false) {
    return Toast.info(msg, duration, onClose, mask);
  }
  static loading(content = TextConstant.loading) {
    return Toast.loading({
      content,
    });
  }
  static remove(key) {
    if (key) {
      Portal.remove(key);
    }
  }
}
